package com.company.goodfuture2020;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main1 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s = br.readLine();
        int maxLen = 0;
        int i = 0,len = s.length();
        String res = "";
        while(i < len){
            while(i < len && (s.charAt(i) < '0' || s.charAt(i) > '9')){
                i++;
            }
            int j = i;
            while(j < len && s.charAt(j) >= '0' && s.charAt(j) <= '9'){
                j++;
            }
            if(j - i > maxLen){
                res = s.substring(i,j);
                maxLen = j - i;
            }
            i = j;
        }
        System.out.println(res);
    }
}
